﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/AdminMaster.Master" AutoEventWireup="true" CodeBehind="AdminCompanyService.aspx.cs" Inherits="TravelLink.WebApp.Admin.AdminCompanyService" %>
<%@ Register assembly="DevExpress.Web.ASPxGridView.v11.1, Version=11.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v11.1, Version=11.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxGridView.v11.1.Export, Version=11.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView.Export" tagprefix="dx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table class="style1">
        <tr>
            <td>
                <table class="style1">
                    <tr>
                        <td>
                            <dx:ASPxLabel ID="ASPxLabel1" runat="server" Text="关键字:">
                            </dx:ASPxLabel>
                        </td>
                        <td style="text-align: right">
                            <dx:ASPxTextBox ID="ASPxTextBox1" runat="server" Width="620px">
                            </dx:ASPxTextBox>
                        </td>
                        <td>
                            <dx:ASPxButton ID="abtnExport" runat="server" onclick="abtnExport_Click" 
                                Text="导出excel">
                            </dx:ASPxButton>
                        </td>
                        <td>
                                        <dx:ASPxButton ID="ASPxButton2" runat="server" AutoPostBack="False" Text="新增">
                    <ClientSideEvents Click="function(s, e) {
	agv.AddNewRow();
}" />
                </dx:ASPxButton>
                        </td>
                        <td>
                            <dx:ASPxButton ID="ASPxButton1" runat="server" onclick="ASPxButton1_Click" 
                                Text="搜索" Width="80px">
                            </dx:ASPxButton>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
                <dx:ASPxGridView ID="ASPxGridView1" runat="server" AutoGenerateColumns="False" 
        DataSourceID="LinqDataSource1" KeyFieldName="Idx"  ClientInstanceName="agv"
        onhtmldatacellprepared="ASPxGridView1_HtmlDataCellPrepared" 
        onhtmlrowprepared="ASPxGridView1_HtmlRowPrepared">
        <Columns>
            <dx:GridViewCommandColumn ButtonType="Button" VisibleIndex="17">
                <EditButton Text="查看" Visible="True">
                </EditButton>
                <NewButton Text="新增">
                </NewButton>
                <DeleteButton Text="删除" Visible="True">
                </DeleteButton>
                <CancelButton Text="取消" Visible="True">
                </CancelButton>
                <UpdateButton Text="保存" Visible="True">
                </UpdateButton>
            </dx:GridViewCommandColumn>
            <dx:GridViewDataComboBoxColumn Caption="企业名称" FieldName="CompanyCode" 
                VisibleIndex="0">
                <PropertiesComboBox DataSourceID="ldsCompany" TextField="CompanyName" 
                    ValueField="CompanyCode" ValueType="System.String">
                </PropertiesComboBox>
            </dx:GridViewDataComboBoxColumn>
            <dx:GridViewDataTextColumn Caption="提奖计算" VisibleIndex="11" Width="60px">
                <EditFormSettings Visible="False" />
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="总价" VisibleIndex="10" Width="60px">
                <EditFormSettings Visible="False" />
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn FieldName="Idx" ReadOnly="True" 
                VisibleIndex="1" Caption="编号" Width="50px">
                <EditFormSettings Visible="False" />
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn FieldName="Name" 
                VisibleIndex="2" Caption="项目描述" Width="150px">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataMemoColumn Caption="备注" FieldName="Content" Visible="False" 
                VisibleIndex="3" Width="300px">
                <EditFormSettings Visible="True" />
            </dx:GridViewDataMemoColumn>
            <dx:GridViewDataDateColumn Caption="开始时间" FieldName="StartDate" 
                VisibleIndex="4" Width="80px">
            </dx:GridViewDataDateColumn>
            <dx:GridViewDataDateColumn Caption="结束时间" FieldName="EndTime" VisibleIndex="5" 
                Width="80px">
            </dx:GridViewDataDateColumn>
            <dx:GridViewDataTextColumn Caption="单价" FieldName="Price" 
                VisibleIndex="6">
                <EditFormSettings Visible="True" />
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataComboBoxColumn Caption="付款方式" FieldName="PaymentTypeID" 
                VisibleIndex="7" Width="80px">
                <PropertiesComboBox DataSourceID="ldspaymenttype" TextField="Name" 
                    ValueField="Idx" ValueType="System.String">
                </PropertiesComboBox>
                <EditFormSettings Visible="True" />
            </dx:GridViewDataComboBoxColumn>
            <dx:GridViewDataTextColumn Caption="数量" FieldName="Qty" VisibleIndex="9">
                <EditFormSettings Visible="True" />
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataComboBoxColumn Caption="创建人" FieldName="CreateOpr" 
                ReadOnly="True" Visible="False" VisibleIndex="14">
                <PropertiesComboBox DataSourceID="ldsadmin" TextField="Name" ValueField="Idx" 
                    ValueType="System.String">
                </PropertiesComboBox>
            </dx:GridViewDataComboBoxColumn>
            <dx:GridViewDataMemoColumn Caption="付款记录" FieldName="PayNotes" Visible="False" 
                VisibleIndex="14" Width="300px">
            </dx:GridViewDataMemoColumn>
            <dx:GridViewDataTextColumn Caption="付款凭证" FieldName="PayNumber" Visible="False" 
                VisibleIndex="15">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataDateColumn Caption="付款期限" FieldName="PayLimit" Visible="False" 
                VisibleIndex="16">
            </dx:GridViewDataDateColumn>
            <dx:GridViewDataCheckColumn Caption="是否付款" FieldName="Paid" VisibleIndex="8" 
                Width="60px">
                <EditFormSettings Visible="True" />
            </dx:GridViewDataCheckColumn>
            <dx:GridViewDataComboBoxColumn Caption="提奖方式" FieldName="CommissionType" 
                VisibleIndex="13" Visible="False">
                <PropertiesComboBox DataSourceID="ldsctype" TextField="Name" ValueField="ID" 
                    ValueType="System.String">
                </PropertiesComboBox>
                <EditFormSettings Visible="True" />
            </dx:GridViewDataComboBoxColumn>
            <dx:GridViewDataTextColumn Caption="提奖" FieldName="Commission" Visible="False" 
                VisibleIndex="12">
                <EditFormSettings Visible="True" />
            </dx:GridViewDataTextColumn>
        </Columns>
    </dx:ASPxGridView></td>
        </tr>
    </table>
    
    <asp:LinqDataSource ID="LinqDataSource1" runat="server" 
        ContextTypeName="TravelLink.DAL.TravelLinkDBDataContext" EnableDelete="True" 
        EnableInsert="True" EnableUpdate="True" EnableViewState="False" 
        EntityTypeName="" oninserting="LinqDataSource1_Inserting" OrderBy="StartDate" 
        TableName="TL_Company_Service">
    </asp:LinqDataSource>
    <asp:LinqDataSource ID="ldsctype" runat="server" 
        ContextTypeName="TravelLink.DAL.TravelLinkDBDataContext" EntityTypeName="" 
        OrderBy="ID" TableName="View_CommissionType">
    </asp:LinqDataSource>
    <asp:LinqDataSource ID="ldspaymenttype" runat="server" 
        ContextTypeName="TravelLink.DAL.TravelLinkDBDataContext" EntityTypeName="" 
        OrderBy="SortID" TableName="TL_PaymentType">
    </asp:LinqDataSource>
    <asp:LinqDataSource ID="ldsadmin" runat="server" 
        ContextTypeName="TravelLink.DAL.TravelLinkDBDataContext" EntityTypeName="" 
        TableName="TL_Admin">
    </asp:LinqDataSource>
<asp:LinqDataSource ID="ldsCompany" runat="server" 
    ContextTypeName="TravelLink.DAL.TravelLinkDBDataContext" EntityTypeName="" 
    OrderBy="CreateDate" TableName="TL_Company">
</asp:LinqDataSource>
    <dx:ASPxGridViewExporter ID="ASPxGridViewExporter1" runat="server" 
        GridViewID="ASPxGridView1">
    </dx:ASPxGridViewExporter>
</asp:Content>
